package com.cos.lession68.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * @author: COS
 * @time: 2022/9/20 17:14
 * @description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
/**
 * String Integer  null
 */
public class Emp {
    private Integer eno;
    private String ename;
    private String esex;
    private Double salary;
    private String pwd;
    private Integer dno;
    private Date bornDate;
    /* 1个员工 只有1个部门 一对一的关系
    * 一对一在链表查询中,就是创建一个对应的实体类对象(单个对象属性)
    *  */
    private Dept d;
    /**
     *
     * @author: COS
     * @return:
     * @time: 2022/9/22 11:46
     * @description:
     */
        public Emp(Integer eno, String ename, String esex, Double salary, String pwd, Integer dno, Date bornDate) {
//    public Emp(int eno, String ename, String esex, double salary, String pwd, int dno, Date bornDate) {
        System.out.println("构造方法执行力额");
        this.eno = eno;
        this.ename = ename;
        this.esex = esex;
        this.salary = salary;
        this.pwd = pwd;
        this.dno = dno;
        this.bornDate = bornDate;
    }

    public Emp(String ename, String esex, double salary, String pwd, int dno, Date bornDate) {
        this.ename = ename;
        this.esex = esex;
        this.salary = salary;
        this.pwd = pwd;
        this.dno = dno;
        this.bornDate = bornDate;
    }
}
